package management;
import java.util.Scanner;
import java.lang.*;
//输入信息
public class Input {
    public static void main(String[] args) {
        int num, sum;
        outLoop:
        while (true) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入员工姓名");
            String name = sc.next();
            System.out.println("请输入员工性别");
            String sex = sc.next();
            System.out.println("请输入员工生日");
            String birthday = sc.next();
            System.out.println("请输入员工所在部门代码");
            String department_code = sc.next();
            System.out.println("请输入员工所在部门名称");
            String department_name = sc.next();
            System.out.println("是否继续输入，是则按1，否按0");
            num = sc.nextInt();
            Information information=new Information();
            information.setBirthday(birthday);
            information.setName(name);
            information.setSex(sex);
            information.setDepartment_code(department_code);
            information.setDepartment_name(department_name);
            if (num == 1) {
                continue;
            } else if (num == 0) {
                break;
            } else if (num != 0 || num != 1) {
                while (true) {
                    System.out.println("输入格式有误，请重新输入");
                    sum = sc.nextInt();
                    if (sum == 0) {
                        break outLoop;
                    } else if(sum==1) {
                    num=sum;
                    break;
                    }else {
                        continue;
                    }
                }
            }

        }
    }
}
